<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2020/7/24
  Time: 15:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String basePath = request.getScheme()
            +"://"
            +request.getServerName()
            + ":"
            +request.getServerPort()
            +request.getContextPath()
            +"/";
%>
<html>
<head>
    <base href="<%=basePath%>">
    <title>选择评委</title>
    <script type="text/javascript" src="${pageContext.request.contextPath}/webjars/jquery/3.5.1/jquery.min.js"></script>
    <script type="text/javascript">
        $(function() {
            $("#sub_btn").click(function () {
                $("span.errorMsg").text("");
            });
        });
    </script>
</head>
<body>
选择可以进行这轮投票的评委:
<form action="voteServlet" method="post">
    <input type="hidden" name="action" id="action" value="beginVote"/>
<table>
    <tr>
        <c:forEach items="${sessionScope.judges}" var="entry">
            <td>
            <input name="judges" type="checkbox" value="${entry.judgeId}" checked="checked"/>用户名${entry.judgename}密码${entry.judgepassword}
            </td>
        </c:forEach>
        <td>
        </td>
    </tr>
    <tr>
        <td>
            <input type="submit" value="确定" id="sub_btn"/>
        </td>
    </tr>
</table>
    <span class="errorMsg">
        ${requestScope.msg}
    </span>
</form>
</body>
</html>
